package com.ssm.model;

import java.util.Date;
//信件表
public class Letter {

	private Integer id;
	//评论内容
	private String content;
	//发信人
	private Integer from_id;
	//收信人
	private Integer to_id;
	//发信时间
	private Date create_time;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getFrom_id() {
		return from_id;
	}

	public void setFrom_id(Integer fromId) {
		from_id = fromId;
	}

	public Integer getTo_id() {
		return to_id;
	}

	public void setTo_id(Integer toId) {
		to_id = toId;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date createTime) {
		create_time = createTime;
	}

	@Override
	public String toString() {
		return "Letter [content=" + content + ", create_time=" + create_time
				+ ", from_id=" + from_id + ", id=" + id + ", to_id=" + to_id
				+ "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((content == null) ? 0 : content.hashCode());
		result = prime * result
				+ ((create_time == null) ? 0 : create_time.hashCode());
		result = prime * result + ((from_id == null) ? 0 : from_id.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((to_id == null) ? 0 : to_id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Letter other = (Letter) obj;
		if (content == null) {
			if (other.content != null)
				return false;
		} else if (!content.equals(other.content))
			return false;
		if (create_time == null) {
			if (other.create_time != null)
				return false;
		} else if (!create_time.equals(other.create_time))
			return false;
		if (from_id == null) {
			if (other.from_id != null)
				return false;
		} else if (!from_id.equals(other.from_id))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (to_id == null) {
			if (other.to_id != null)
				return false;
		} else if (!to_id.equals(other.to_id))
			return false;
		return true;
	}
	
	

}
